package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 附件信息表
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tc_file_upload_info")
public class FileUploadInfoPO extends DMSBasePO<FileUploadInfoPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 附件上传ID
     */
        @TableId(value = "FILE_UPLOAD_INFO_ID", type = IdType.AUTO)
        private Integer fileUploadInfoId;
    @TableField("APP_ID")
    private String AppId;
    /**
     * 附件类型
     */
    @TableField("BILL_TYPE")
    private Integer billType;
    /**
     * 大，中，小
     */
    @TableField("FILE_SIZE")
    private Integer fileSize;
    /**
     * 附件URL
     */
    @TableField("FILE_ID")
    private String fileId;
    /**
     * 主单单据ID
     */
    @TableField("BILL_ID")
    private Integer billId;
    /**
     * 有效，无效
     */
    @TableField("IS_VALID")
    private Integer isValid;
    /**
     * 文件类型明细
     */
    @TableField("FILE_TYPE_DETAIL")
    private Integer fileTypeDetail;
    /**
     * 附件文件名称
     */
    @TableField("FILE_NAME")
    private String fileName;
    /**
     * 版本记录号
     */
    @TableField("RECORD_VERSION")
    private Integer recordVersion;
    /**
     * CREATED_BY
     */
    @TableField("CREATED_BY")
    private String createdBy;

    /**
     * CREATED_AT
     */
    @TableField(value = "CREATED_AT", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * UPDATED_BY
     */
    @TableField("UPDATED_BY")
    private String updatedBy;

    /**
     * UPDATED_AT
     */
    @TableField(value = "UPDATED_AT", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public FileUploadInfoPO() {
        super();
    }


    public Integer getFileUploadInfoId() {
        return fileUploadInfoId;
    }

    public void setFileUploadInfoId(Integer fileUploadInfoId) {
        this.fileUploadInfoId = fileUploadInfoId;
    }

    public String getAppId() {
        return AppId;
    }

    public void setAppId(String appId) {
        AppId = appId;
    }

    @Override
    public Integer getRecordVersion() {
        return recordVersion;
    }

    @Override
    public void setRecordVersion(Integer recordVersion) {
        this.recordVersion = recordVersion;
    }

    @Override
    public String getCreatedBy() {
        return createdBy;
    }

    @Override
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Override
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    @Override
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String getUpdatedBy() {
        return updatedBy;
    }

    @Override
    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }

    @Override
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    @Override
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Integer getBillType() {
        return billType;
    }

    public void setBillType(Integer billType) {
        this.billType = billType;
    }

    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    public Integer getBillId() {
        return billId;
    }

    public void setBillId(Integer billId) {
        this.billId = billId;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getFileTypeDetail() {
        return fileTypeDetail;
    }

    public void setFileTypeDetail(Integer fileTypeDetail) {
        this.fileTypeDetail = fileTypeDetail;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.fileUploadInfoId;
    }

    @Override
    public String toString() {
        return "FileUploadInfoPO{" +
        "fileUploadInfoId=" + fileUploadInfoId +
                ", AppId='" + AppId + '\'' +
        ", billType=" + billType +
        ", fileSize=" + fileSize +
                ", fileId='" + fileId + '\'' +
        ", billId=" + billId +
        ", isValid=" + isValid +
        ", fileTypeDetail=" + fileTypeDetail +
                ", fileName='" + fileName + '\'' +
                ", recordVersion=" + recordVersion +
                ", createdBy='" + createdBy + '\'' +
                ", createdAt=" + createdAt +
                ", updatedBy='" + updatedBy + '\'' +
                ", updatedAt=" + updatedAt +
        ", isDeleted=" + isDeleted +
                '}';
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "fileUploadInfoId");
    }


}
